import model
from libs.safehtml.parser import SafeHtmlParser

def getSafeCustomTheme(html):
	parser = SafeHtmlParser()
	return parser.getSafeHtml(html)

def storeNewCustomTheme(html):
	theme = model.CustomTheme(html=getSafeCustomTheme(html))
	theme.put()
	return theme